<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>        
    </ul>
    <script>
        var date = new Date();
        var y = date.getFullYear();
        var m = date.getMonth();
        var d = date.getDate();
        var str = y + "年" + (m + 1) + "月" + d + "日";
        document.write(str); //将内容打印在页面上

        // 模板字符串
        var str1 = `${y}年${m + 1}月${d}日`;
        document.write(str1);

        var str2 = "";
        for(var i = 0;i < 10;i++){
            str2 += `<li>
                    <h1>zheshi li${i}</h1>
                </li>`
        }
        document.querySelector("ul").innerHTML = str2;


    </script>
</body>
</html>